package com.han.springboot01.mapper;
import com.han.springboot01.pojo.Manager;
import com.han.springboot01.pojo.Manager;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.hibernate.HibernateException;

import java.util.List;

@Mapper
public interface IManager  {
    @Insert("INSERT INTO manager (mname,mpassword) VALUES(#{name},#{password})")
    public int saveUser(@Param("name") String name, @Param("password") String password);

    @Select("select id,mname,mpassword from manager where mname=#{name}")
    Manager selectManager(@Param("name") String name);
//public List<Manager> selectByNP(@Param("mname") String mname,@Param("mpassword") String mpassword);

}
